/* eslint-disable */
// @ts-ignore
import request from '@/http/vue-query';
import { CustomRequestOptions_ } from '@/http/types';

import * as API from './types';

/** 创建群聊 创建群聊 POST /group/create */
export function groupCreateUsingPost({
  body,
  options,
}: {
  body: API.GroupVO;
  options?: CustomRequestOptions_;
}) {
  return request<API.ResultGroupVO>('/group/create', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 解散群聊 解散群聊 DELETE /group/delete/${param0} */
export function groupOpenApiDeleteGroupIdUsingDelete({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.GroupOpenApiDeleteGroupIdUsingDeleteParams;
  options?: CustomRequestOptions_;
}) {
  const { groupId: param0, ...queryParams } = params;

  return request<API.Result>(`/group/delete/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 查询群聊 查询单个群聊信息 GET /group/find/${param0} */
export function groupFindGroupIdUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.GroupFindGroupIdUsingGetParams;
  options?: CustomRequestOptions_;
}) {
  const { groupId: param0, ...queryParams } = params;

  return request<API.ResultGroupVO>(`/group/find/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 邀请进群 邀请好友进群 POST /group/invite */
export function groupInviteUsingPost({
  body,
  options,
}: {
  body: API.GroupInviteDTO;
  options?: CustomRequestOptions_;
}) {
  return request<API.Result>('/group/invite', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 踢出群聊(已废弃) 将用户踢出群聊 DELETE /group/kick/${param0} */
export function groupKickGroupIdUsingDelete({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.GroupKickGroupIdUsingDeleteParams;
  options?: CustomRequestOptions_;
}) {
  const { groupId: param0, ...queryParams } = params;

  return request<API.Result>(`/group/kick/${param0}`, {
    method: 'DELETE',
    params: {
      ...queryParams,
    },
    ...(options || {}),
  });
}

/** 查询群聊列表 查询群聊列表 GET /group/list */
export function groupListUsingGet({
  options,
}: {
  options?: CustomRequestOptions_;
}) {
  return request<API.ResultListGroupVO>('/group/list', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 查询群聊成员 查询群聊成员 GET /group/members/${param0} */
export function groupMembersGroupIdUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.GroupMembersGroupIdUsingGetParams;
  options?: CustomRequestOptions_;
}) {
  const { groupId: param0, ...queryParams } = params;

  return request<API.ResultListGroupMemberVO>(`/group/members/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 将成员移出群聊 将成员移出群聊 DELETE /group/members/remove */
export function groupMembersRemoveUsingDelete({
  body,
  options,
}: {
  body: API.GroupMemberRemoveDTO;
  options?: CustomRequestOptions_;
}) {
  return request<API.Result>('/group/members/remove', {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 修改群聊信息 修改群聊信息 PUT /group/modify */
export function groupModifyUsingPut({
  body,
  options,
}: {
  body: API.GroupVO;
  options?: CustomRequestOptions_;
}) {
  return request<API.ResultGroupVO>('/group/modify', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 退出群聊 退出群聊 DELETE /group/quit/${param0} */
export function groupQuitGroupIdUsingDelete({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.GroupQuitGroupIdUsingDeleteParams;
  options?: CustomRequestOptions_;
}) {
  const { groupId: param0, ...queryParams } = params;

  return request<API.Result>(`/group/quit/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}
